package io.gbznt.modules.buss.constatnt;

/**
 * 农田状态；
 */
public enum FarmlandStatusEnum {
	/**
	 * 种植中
	 */
	USING(1, "种植中"),
	/**
	 * 待审核
	 */
	STOP(0, "荒废");

	private final int value;

	private final String description;

	private FarmlandStatusEnum(int value, String description) {
		this.value = value;
		this.description = description;
	}

	public int getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}

	public static FarmlandStatusEnum getByValue(Integer value) {
		if (null == value) {
            return null;
        }
		for (FarmlandStatusEnum enumObj : FarmlandStatusEnum.values()) {
			if (value.equals(enumObj.getValue())) {
                return enumObj;
            }
		}
		return null;
	}

	public static FarmlandStatusEnum getByDesc(String description) {
		if (null == description) {
            return null;
        }
		for (FarmlandStatusEnum enumObj : FarmlandStatusEnum.values()) {
			if (description.equals(enumObj.getDescription())) {
                return enumObj;
            }
		}
		return null;
	}

}